<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理控制台</title>
    <link href="/static/hplus/css/bootstrap.min.css?v={php}echo time(){/php}" rel="stylesheet">
    <link href="/static/hplus/css/font-awesome.min.css?v={php}echo time(){/php}" rel="stylesheet">
    <link href="/static/hplus/css/style.min.css?v={php}echo time(){/php}" rel="stylesheet">
    <style type="text/css">
        .img-circle {width: 64px;height: 64px;}
        #one_nav {float: left;}
        .btn_nav_avtice {background: #f4a;color: #fff;}
        .nav > .modular {display: none;}
    </style>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close"><i class="fa fa-times-circle"></i></div>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li class="nav-header">管理控制台</li>
                {if(!empty($menu))}
                {foreach $menu as $item}
                <li class="modular" modular="modular{$item.modular}">
                    {if($item.url==='#')}
                    <a href="#">
                        <i class=""></i>
                        <span class="nav-label">{$item.title}</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        {if(!empty($item.children))}
                        {foreach $item.children as $son_item}
                        <li>
                            <a class="J_menuItem" href="#{$son_item.identity}" data-txt="{$son_item.title}" data-url="{$son_item.url}" data-modular="modular{$item.modular}" isleft="1">{$son_item.title}</a>
                        </li>
                        {/foreach}
                        {/if}
                    </ul>
                    {else/}
                    <a class="J_menuItem top_level" href="#{$item.identity}" data-txt="{$item.title}" data-url="{$item.url}" data-modular="modular{$item.modular}"><i class=""></i>{$item.title}</a>
                    {/if}
                </li>
                {/foreach}
                {/if}
            </ul>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <a class="navbar-minimalize minimalize-styl-2 btn btn-primary" href="#"><i class="fa fa-bars"></i>
                    </a>
                </div>
                <div id="one_nav">
                    {foreach $modular as $k=>$mod}
                    <a class="minimalize-styl-2 btn" data-modular="modular{$mod.id}" infoc="0" href="javascript:">{$mod.title}</a>
                    {/foreach}
                </div>
                <div style="clear: both"></div>
            </nav>
        </div>
        <div class="content-tabs">
            <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i></button>
            <nav class="page-tabs J_menuTabs">
                <div class="page-tabs-content">
                    <a href="javascript:" class="active J_menuTab" data-modular="first" data-id="/index_v1">首页</a>
                </div>
            </nav>
            <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i></button>
            <div class="roll-nav roll-right J_tabExit" style="width: auto;">您好，<a class="J_menuItem other" title="修改信息" data-url="{:url('admin/edit', ['t'=>'1'])}" href="#admin_edit" data-txt="修改管理员">{$admin.username}</a> &nbsp; <a href="/login/index?action=logout" style="color: #999"><i class="fa fa fa-sign-out"></i> 注销</a></div>
        </div>
        <div class="J_mainContent" id="content-main">
            <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="{:url('index_v1')}" data-id="/index_v1" seamless></iframe>
        </div>
        <div class="footer">
            <div class="pull-right">&copy; 2017-2030 网络科技有限公司</div>
        </div>
    </div>
    <!--右侧部分结束-->
</div>
</body>
<script type="text/javascript">
    let menu_str = JSON.parse('<?php echo $menu_str; ?>')
    let modular_str = JSON.parse('<?php echo $modular_str; ?>')
</script>
<script type="text/javascript" src="/static/hplus/js/jquery.min.js?v={php}echo time(){/php}"></script>
<script type="text/javascript" src="/static/hplus/js/bootstrap.min.js?v={php}echo time(){/php}"></script>
<script type="text/javascript" src="/static/hplus/js/plugins/metisMenu/jquery.metisMenu.js?v={php}echo time(){/php}"></script>
<script type="text/javascript" src="/static/hplus/js/plugins/slimscroll/jquery.slimscroll.min.js?v={php}echo time(){/php}"></script>
<script type="text/javascript" src="/static/hplus/js/plugins/layer/layer.min.js?v={php}echo time(){/php}"></script>
<script type="text/javascript" src="/static/hplus/js/hplus.min.js?v={php}echo time(){/php}"></script>
<script type="text/javascript" src="/static/hplus/js/contabs.min.js?v={php}echo time(){/php}"></script>
<script type="text/javascript">
    $(function () {
        let $navA = $('#one_nav a')
        $navA.hover(function () {
            $navA.removeClass('btn_nav_avtice').css('color', '#337ab7');
            $(this).addClass('btn_nav_avtice').css('color', '#fff');
        }).mouseout(function () {
            $navA.removeClass('btn_nav_avtice').css('color', '#337ab7');
            $('#one_nav a[infoc="1"]').addClass('btn_nav_avtice').css('color', '#fff');
        }).click(function () {
            $navA.attr('infoc', '0')
            $(this).attr('infoc', '1')
            $('.modular').css('display', 'none');
            let $mod2 = $(this).data('modular');
            $('.modular[modular="' + $mod2 + '"]').css('display', 'block')
        })
        $('.top_level').click(function () {
            $('#side-menu>li.modular').removeClass('active')
            $(this).parent('li').addClass('active')
        })
    })
</script>
</html>
